import request from '@/utils/axiosRequest'
import useEnv from "@/hooks/useEnv";
const show = useEnv.VITE_FILE_API + "/GetFileById?id="

const getPhotographTypes = (x) => {
    return request({
        url: '/PhotographType/Get' 
    })
}

const addPhotographType = (data)=>{
    return request({
        url:'/PhotographType/Add',
        data:data,
        method:'post'
    })
}
const editPhotographType = (data)=>{
    return request({
        url:'/PhotographType/Update',
        data:data,
        method:'post'
    })
}

const getPhotographs = (x)=>{
    return request({
        url:'/Photograph/GetBySelect?pageIndex='+x.pageIndex+'&pageSize='+x.pageSize+'&searchValue='+x.searchValue+'&searchName='+x.searchName
    })
}

const deletePhotograph = (x)=>{
    return request({
        url:'/Photograph/SoftDeleteById?id='+x,
        method:'delete'
    }) 
}

export default{
    show ,
    deletePhotograph,
    getPhotographTypes,
    addPhotographType,
    editPhotographType,
    getPhotographs
}